<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/root.css"/>
    <link rel="stylesheet" type="text/css" href="css/pay/main.css"/>
    <link rel="stylesheet" type="text/css" href="css/order/order.css"/>
    <script type="text/javascript" src="js/jquery-3.1.1.min.js?ver=2.0.4" charset="utf-8"></script>
    <script type="text/javascript" src="js/underscore-min.js"></script>
    <script type="text/javascript" src="js/moment.min.js"></script>
    <script src="js/base/api.js"></script>
    <script src="js/base/base.js"></script>
    <script src="js/base/vue-filter.js"></script>
    <script src="js/vue/vue.js"></script>
    <script src="cordova.js"></script>

    <script type="text/javascript" src="js/magiclamp.js?ver=2.0.3" charset="utf-8"></script>


    <script type="text/javascript" src="js/order/user_goods_order.js?ver=2.0.4" charset="utf-8"></script>

</head>
<body>
<div id="user_goods_order_page">
    <header>
        <a @click="page_back" v-if="baseConfig.is_phone" class="h-left back-btn">
            <i class="iconfont icon-fanhui"></i>
        </a>
        <h1 class="h-title">
            订单详情
        </h1>
    </header>

    <form method="post" id="gotopay_form">
        <div id="root" class="h-t-bar">
            <div class="service-charge order-detail-status">
                发货状态：
                <span v-if="orderinfo.goods_status==0">未发货</span>
                <span v-if="orderinfo.goods_status==1">正在备货</span>
                <span v-if="orderinfo.goods_status==2">已发货</span>
                <span v-if="orderinfo.goods_status==3">已收货</span>
                <span v-if="orderinfo.goods_status==4">已完成</span>
                &nbsp;&nbsp;&nbsp;付款状态：
                <span v-if="orderinfo.status==0" >未付款</span>
                <span v-if="orderinfo.status==1" >已付款</span>
                <span v-if="orderinfo.status==-1" >已取消</span>
                <span v-if="orderinfo.status==-2" >正在退款</span>
                <span v-if="orderinfo.status==-3" >已退款</span>
            </div>
            <div class="pay-gs-list g-wrap margin-bottom">
                <!--<div class="order-info">-->
                <!--<div class="order-price">-->
                <!--<img :src="orderinfo.user__icon_url+'&imageView2/1/w/40/h/40'" class="head-img">-->
                <!--<span v-text="">{{orderinfo.user__realname}}</span>-->
                <!--</div>-->
                <!--</div>-->

                <div v-for="goodsitem in goods_order_item">
                    <div class="g-item">
                        <div class="g-item-wrap">
                            <span class="g-img">
                                <img :src="baseConfig.qn_host+goodsitem.small_image__fileurl+'?imageView2/1/w/70/h/70'">
                            </span>
                            <div class="g-i-info">
                                <p class="g-i-name order-goods-title">{{goodsitem.name}}</p>
                                <p class="order-goods-mark margin-bottom" v-if="goodsitem.gg">{{goodsitem.gg}}</p>
                                <p class="order-goods-mark"v-if="goodsitem.bz" v-text="'备注:'+goodsitem.bz"></p>
                                <p class="order-goods-mark" v-if="goodsitem.id">商品ID:{{goodsitem.goods_id}}</p>
                                <p class="order-count">
                                    <span class="order-goods-price" v-text="price_filter(goodsitem.price)"></span>
                                    <span class="order-goods-num">数量{{goodsitem.num}}</span>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="g-item-bz" ></div>
                </div>
                <div class=" padding-1">
                    <div class="order-list">
                        <div class="left">商品总价：</div>
                        <div class="right price"><span v-text="price_filter(orderinfo.price)"></span></div>
                    </div>
                </div>
                <div class=" padding-1">
                    <div class="order-list">
                        <div class="left">运费：</div>
                        <div class="right price"><span v-text="price_filter(orderinfo.express_fee)"></span></div>
                    </div>
                </div>
                <div class=" padding-1">
                    <div class="order-list">
                        <div class="left">订单总额：</div>
                        <div class="right price"><span v-text="price_filter(orderinfo.express_fee+orderinfo.price)"></span></div>
                    </div>
                </div>
            </div>
            <div class="padding-1 white">
                <div class="order-list">
                    <div class="left">订单号：</div>
                    <div class="right">{{orderinfo.id}}</div>
                </div>
            </div>
            <div class="padding-1 white">
                <div class="order-list">
                    <div class="left">收件人：</div>
                    <div class="right">{{orderinfo.receiver_name}}</div>
                </div>
            </div>
            <div class="padding-1 white">
                <div class="order-list">
                    <div class="left">电话：</div>
                    <div class="right">{{orderinfo.receiver_phone}}</div>
                </div>
            </div>
            <div class="padding-1 white">
                <div class="order-list">
                    <div class="left">邮寄地址：</div>
                    <div class="right">
                        {{orderinfo.receiver_province_name}}{{orderinfo.receiver_city_name}}{{orderinfo.receiver_county_name}}
                    </div>
                </div>
            </div>
            <div class="padding-1 white">
                <div class="order-list">
                    <div class="left">付款状态：</div>
                    <div class="right">
                        <span v-if="orderinfo.status==0" >未付款</span>
                        <span v-if="orderinfo.status==1" >已付款</span>
                        <span v-if="orderinfo.status==-1" >已取消</span>
                        <span v-if="orderinfo.status==-2" >正在退款</span>
                        <span v-if="orderinfo.status==-3" >已退款</span>
                    </div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.status==1">
                <div class="order-list">
                    <div class="left">付款时间：</div>
                    <div class="right">{{orderinfo.pay_date}}</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.status==-3||orderinfo.status==-2">
                <div class="order-list">
                    <div class="left">退货方式：</div>
                    <div class="right" v-if="orderinfo.refund_type==1">用户退货</div>
                    <div class="right" v-if="orderinfo.refund_type==2">商家退货</div>
                    <div class="right" v-if="orderinfo.refund_type==3">平台退货</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.dispute_step!=0">
                <div class="order-list">
                    <div class="left">投诉进度：</div>
                    <div class="right" v-if="orderinfo.dispute_step==1">提交投诉</div>
                    <div class="right" v-if="orderinfo.dispute_step==2">正在受理</div>
                    <div class="right" v-if="orderinfo.dispute_step==3">投诉解决</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.dispute_step!=0">
                <div class="order-list">
                    <div class="left">投诉方式：</div>
                    <div class="right" v-if="orderinfo.dispute_type==1">用户投诉</div>
                    <div class="right" v-if="orderinfo.dispute_type==2">主播投诉</div>
                    <div class="right" v-if="orderinfo.dispute_type==3">系统自检</div>
                </div>
            </div>
            <div class="padding-1 white">
                <div class="order-list">
                    <div class="left">发货状态：</div>
                    <div class="right">
                        <span v-if="orderinfo.goods_status==0">未发货</span>
                        <span v-if="orderinfo.goods_status==1">正在备货</span>
                        <span v-if="orderinfo.goods_status==2">已发货</span>
                        <span v-if="orderinfo.goods_status==3">已收货</span>
                        <span v-if="orderinfo.goods_status==4">已完成</span>

                    </div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.goods_status>1">
                <div class="order-list">
                    <div class="left">发货时间：</div>
                    <div class="right">{{orderinfo.shipped_date}}</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.goods_status>1">
                <div class="order-list">
                    <div class="left">快递公司：</div>
                    <div class="right">
                        <span v-if="orderinfo.express__name">{{orderinfo.express__name}}</span>
                        <span v-if="!orderinfo.express__name">{{orderinfo.express_name}}</span>
                    </div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.goods_status>1">
                <div class="order-list">
                    <div class="left">快递单号：</div>
                    <div class="right">{{orderinfo.express_no}}</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.goods_status>2">
                <div class="order-list">
                    <div class="left">收货时间：</div>
                    <div class="right">{{orderinfo.received_date}}</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.goods_status>3">
                <div class="order-list">
                    <div class="left">完成时间：</div>
                    <div class="right">{{orderinfo.complete_date}}</div>
                </div>
            </div>
            <div class="padding-1 white" v-if="orderinfo.goods_status==0">
                <div class="order-list">
                    <div class="left">一小时内未完成支付，订单自动取消</div>
                </div>
            </div>
            <div class="pay-btn-group border-top">
                <button type="button" class="open-payorder-btn" @click="open_dispute_orders(orderinfo)">查看所有投诉</button>
                <button type="button" class="open-payorder-btn" v-if="unread_num>0" @click="open_im_2_user(orderinfo)"
                >{{unread_num}}条未读消息
                </button>
                <button type="button" class="delete-payorder-btn" @click="refused_order(orderinfo)"
                        v-if="orderinfo.status==1&&orderinfo.goods_status==0">退货
                </button>
                <button type="button" class="delete-payorder-btn" @click="delete_payorder(orderinfo.pay_order_id)"
                        v-if="orderinfo.status==0">取消订单</button>
                <button type="button" class="open-payorder-btn" @click="open_payorder(orderinfo.pay_order_id)"
                        v-if="orderinfo.status==0">去支付</button>

                <button class="open-payorder-btn" type="button" v-if="orderinfo.goods_status==2&&orderinfo.dispute_step==0" @click="make_goods_order(orderinfo)">
                    确认收货{{shengyudays(orderinfo)}}
                </button>
                <button class="open-payorder-btn" type="button" v-if="orderinfo.goods_status==3&&orderinfo.dispute_step==0" @click="make_goods_order(orderinfo)">
                    完成订单
                </button>
                <button class="delete-payorder-btn" type="button" v-if="(orderinfo.goods_status==2||orderinfo.goods_status==3)&&orderinfo.dispute_step==0" @click="dispute_goods_order(orderinfo)">投诉
                </button>
            </div>
        </div>
    </form>
</div>
</body>
</html>